<ui:fragment xmlns="http://www.w3.org/1999/xhtml"
			 xmlns:ui="http://java.sun.com/jsf/facelets"
			 xmlns:h="http://java.sun.com/jsf/html"
			 xmlns:f="http://java.sun.com/jsf/core"
			 xmlns:rich="http://richfaces.org/rich"
      		 xmlns:a4j="http://richfaces.org/a4j">
	
	<rich:toolBar>
		<!-- Logado -->
		<rich:toolBarGroup itemSeparator="disc" rendered="#{userMB.user.loggedIn}">
			
			<h:form>
				<rich:dropDownMenu>
					<f:facet name="label">
						<h:panelGroup>
							<h:graphicImage value="/images/ball.gif" style="margin-bottom: -4px; margin-right: 2px;" />
							<h:outputText value="Jogos" />
						</h:panelGroup>
					</f:facet>
					
					<rich:menuItem value="Teste" />
					<rich:menuItem value="Teste" />
					<rich:menuItem value="Teste" />
				</rich:dropDownMenu>
			</h:form>
			
			<h:form>
				<rich:dropDownMenu>
					<f:facet name="label">
						<h:panelGroup>
							<h:graphicImage value="/images/ball.gif" style="margin-bottom: -4px; margin-right: 2px;" />
							<h:outputText value="Locais" />
						</h:panelGroup>
					</f:facet>
					
					<rich:menuItem value="Teste" />
					<rich:menuItem value="Teste" />
					<rich:menuItem value="Teste" />
				</rich:dropDownMenu>
			</h:form>
			
			<h:form>
				<h:commandButton value="#{msgs['logout.link']}" action="#{userMB.logout}" />
			</h:form>
		</rich:toolBarGroup>
		
		<!-- Não logado -->
		<rich:toolBarGroup itemSeparator="disc" rendered="#{not userMB.user.loggedIn}">
			<h:panelGrid columns="9">
				<h:form>
					<!-- Login -->
					<h:outputText value="#{msgs['login.text']}:" />
					<rich:spacer width="5px" />
					<h:inputText id="login" label="#{msgs['login.text']}" value="#{userMB.user.login}" 
								 maxlength="20" size="10" required="true" />
					
					<rich:spacer width="10px" />
					
					<!-- Senha -->
					<h:outputText value="#{msgs['password.text']}:" />
					<rich:spacer width="5px" />
					<h:inputSecret id="password" label="#{msgs['password.text']}" 
								   value="#{userMB.user.password}" maxlength="10" size="10" required="true" />
					
					<rich:spacer width="10px" />
					
					<h:commandButton value="#{msgs['enter.text']}" actionListener="#{userMB.login}" />
				</h:form>
			</h:panelGrid>
			
			<h:form>
				<h:commandLink value="#{msgs['forgot.data.link']}" action="#{userMB.loadRecoverDataPage}" />
			</h:form>
			
			<h:form>
				<h:commandLink value="#{msgs['signup.link']}" action="#{userMB.loadRegisterPage}" />
			</h:form>
		</rich:toolBarGroup>
	</rich:toolBar>
</ui:fragment>